home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Plus Extra 1997 #4
/
Amiga Plus Extra 1997 #4.iso
/
pd
/
grafik
/
video easel
/
camrexx
/
tube-worms.rexx
< prev
next >
Wrap
OS/2 REXX Batch file
|
1997-06-09
|
877b
|
30 lines
/* Tube-Worms: By an idea of Toffoli, converted to CAMRexx by THOR */
MakeAlgorithm:
PLANEALGORITHM moore centers
return
/* parameters.alarm */
MakePlane:
if plane=0 then; do
if alts=0 then SETPLANE on /* emerge if timer over */
else SETPLANE off
end
if plane=1 then; do
sum8=north+south+west+east+n_west+n_east+s_west+s_east /* add up */
if sum8>=parameters.alarm then SETPLANE on /* ring alarm */
else SETPLANE off
end
if plane=2 | plane=3 then; do
if alt & alt_ then SETPLANES 12 /* set timer */
else; do
newcenter=centers
if newcenter>0 then newcenter=newcenter-1 /* decrement */
newcenter=newcenter*4 /* set in planes 2..3 */
SETPLANES newcenter
end
end
return